FROM gallop-jdk:1.0.0

ARG SOFTWARE_BASE_URL

COPY settings.xml /root/.m2/settings.xml

RUN mkdir /app && cd /app \
    && wget -O apache-maven-3.6.3-bin.tar.gz $SOFTWARE_BASE_URL/apache-maven-3.6.3-bin.tar.gz \
    && tar -xzf apache-maven-3.6.3-bin.tar.gz \
    && mv apache-maven-3.6.3 /opt/apache-maven-3.6.3 \
    && ln -s /opt/apache-maven-3.6.3 /opt/maven \
    && cd /  && rm -rf /app
   
ENV MAVEN_HOME /opt/maven
ENV PATH $MAVEN_HOME/bin:$PATH

